﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Pixysoft.Framework.Configurations
{
    public interface IXmlNode
    {
        /// <summary>
        /// 取得节点名称
        /// </summary>
        string ElementName { get;}

        /// <summary>
        /// 节点的内容
        /// </summary>
        string Text { get;set;}

        /// <summary>
        /// 节点的属性集合
        /// </summary>
        IXmlPropertyCollection Properties { get;}

        /// <summary>
        /// 节点的单一值集合
        /// </summary>
        IXmlNodeCollection Node { get;}

        /// <summary>
        /// 节点的集合值集合
        /// </summary>
        IXmlNodesCollection Nodes { get;}

        /// <summary>
        /// 序列化
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        string Serialize();

        /// <summary>
        /// 是否换行
        /// </summary>
        /// <param name="indent"></param>
        /// <returns></returns>
        string Serialize(bool indent);
    }
}
